<?php
defined('_VISIT_URL_') or exit('No direct script access allowed');

class housecraft extends base {

	public function __construct() {
		$this->pagePath = _WAP_HOUSECRAFT_PATH_;
		$this->pluginPath = _WAP_COMMON_PATH_;
	}

	//打开列表页
	public function list() {
		$this->wxShare = util::setWxshare(
			'779生活宝-北海优质家政服务信息平台', 
			'提供各类日常生活服务类信息，您的疑难问题小帮手。', 
			_DOMAIN_ . 'index.php?m=housecraft&c=list', 
			_DOMAIN_ . 'static/pic/wx/logo.jpg'
		);

		$this->show('list');
	}

	//打开详情页
	public function info() {
		$info = util::getInfo('housecraftid', util::getGet('housecraftid'), 'housecraft');
		if (empty($info)) {
			echo '系统繁忙中，请稍候再试！';
			return;
		}

		$this->wxShare = util::setWxshare(
			$info['title'], 
			'779生活宝-北海优质家政服务信息平台', 
			_DOMAIN_ . 'index.php?m=housecraft&c=info&from=wx&housecraftid=' . util::getGet('housecraftid'), 
			_DOMAIN_ . 'static/pic/wx/logo.jpg'
		);
		
		$this->show('info');
	}

	//打开地图页
	public function map() {
		$this->import('map');
	}

}